package phasebook.client;

import javax.ejb.Remote;

import phasebook.client.msgs.MessageInfo;
import phasebook.client.msgs.PhotoInfo;
import phasebook.client.msgs.UserInfo;
import phasebook.client.msgs.MovementInfo;
import phasebook.client.msgs.UserProfileInfo;

@Remote
public interface RemotePhasebookService{
	
	// Retrieve Information 

	public UserInfo[] getFriends(long userId);
	
	public UserInfo[] getFriendRequests(long userId);
	
	public UserInfo[] getMyFriendRequests(long userId);
	
	public MovementInfo[] getFinancialMovements(long userId);
	
	public MessageInfo[] getMessages(long myId,long userId);
		
	public UserProfileInfo getProfile(long userId);
	
	public PhotoInfo[] getAlbum(long userId);
	
	public UserInfo[] findUsers(long userId, String regEx) throws Exception;
	
	public byte[] downloadPhoto(long photoId);
	
	// Submit Information 
	
	public long registerUser(UserProfileInfo userProfile) throws Exception;
	
	public void updateUser(UserProfileInfo userProfile) throws Exception;
	
	public long validateLogin(String userName, String password) throws Exception;
	
	public void publishMessage(MessageInfo newMessage) throws Exception;

	public void deleteMessage(long userId, long messageId) throws Exception;
	
	public void requestFriendship(long userId, long friendId) throws Exception;
	
	public void cancelFriendship(long userId, long friendId) throws Exception;
	
	public void cancelFriendshipRequest(long userId, long friendId) throws Exception;
	
	public void denyFriendshipRequest(long userId, long friendId) throws Exception;
	
	public void acceptFriendshipRequest(long userId, long friendId) throws Exception;

	public void addPhoto(long userId, PhotoInfo photo,byte[] imageData) throws Exception;
	
	public void placeBet(long userId, double ammount, int result) throws Exception;
		
}
